package com.macro.mall.demo2.controller;

import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.demo2.dto.HomeRes;
import com.macro.mall.demo2.dto.PmsBrandDto;
import com.macro.mall.demo2.service.HomeService;
import com.macro.mall.model.PmsBrand;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商品管理示例Controller
 */
@Tag(name = "HomeController", description = "商品管理示例接口")
@Controller
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private HomeService homeService;

    /**
     * 获取品牌列表
     * @return
     */
    @Operation(summary = "获取首页")
    @RequestMapping(value = "/content", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<HomeRes> getBrandList() {
        HomeRes homeContent = homeService.getHomeContent();
        return CommonResult.success(homeContent);
    }





}
